%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% File:               table_game.m
%
% Author:             Miguel R. Rueda
%
% Description:        returns table with structural estimates 
% Language:           MATLAB R2013b (8.2.0.701) 64 Bit
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function results=table_game(beta,ses,labels)

A=[beta ses];
table=reshape(A',[size(ses,2) 2*size(A,1)])';


%Extended specification
labels_taba=[labels {'ldist_party' 'Gov' 'H' 'M' 'Constant'}];

labels_tabb=repmat({''},[size(labels_taba,2) 1]);
labels_coeff=reshape([labels_taba' labels_tabb]',[1 size(labels_taba,2)*2])';

results=dataset({labels_coeff,'Vars'},{table, 'PRI_M' 'PRI_H' 'PAN_M' 'PAN_H'});

